package com.dense.kuiniu.floatcabinet.di.module;

import com.dense.kuiniu.floatcabinet.mvp.contract.AdminContract;
import com.dense.kuiniu.floatcabinet.mvp.model.AdminModel;
import com.dense.kuiniu.floatcabinet.mvp.ui.adapter.BoxForAdminAdapter;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.integration.IRepositoryManager;

import dagger.Module;
import dagger.Provides;

/**
 * @author Administrator
 * @date 2020/11/2
 */
@Module
public class AdminModule {
    private AdminContract.View view;

    public AdminModule(AdminContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public AdminContract.View provideView() {
        return view;
    }

    @FragmentScope
    @Provides
    public AdminModel provideCategoryModel(IRepositoryManager repositoryManager) {
        return new AdminModel(repositoryManager);
    }

    @FragmentScope
    @Provides
    public BoxForAdminAdapter provideAdapter() {
        return new BoxForAdminAdapter(null);
    }
} 